#!bin/sh
CKPT_PATH=$1
NAME=$2
OUT_DIR=~/work/median_out_txt/$NAME
mkdir -p $OUT_DIR
IN_DIR=/workspace/volume/cm-mmlab/test_suite/

for dir in $IN_DIR/codec/*
do
    echo $dir
    for video in $dir/*.mp4
    do
        echo $video
        python tools/video_to_txt_new.py \
            --ckpt_path ${CKPT_PATH} \
            --video $video \
            -o ${OUT_DIR}/codec/$(basename $dir)/$(basename $video)
    done
done

for video in $IN_DIR/isp/*.mp4
do
    echo $video
    python tools/video_to_txt_new.py \
        --ckpt_path ${CKPT_PATH} \
        --video $video \
        -o ${OUT_DIR}/isp/$(basename $video)
done
